﻿<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2">
  <class name="EnetaMvc.Core.Domain.Content.Comment,EnetaMvc.Core" table="comments">

    <id name="Id" column="comment_id" type="long">
      <generator class="identity"/>
    </id>

    <property name="Body" column="comment_body" type="string" />
    <property name="Created" column="created" type="DateTime" />
    
    <many-to-one name="Author" column="user_id" class="EnetaMvc.Core.Domain.Common.User,EnetaMvc.Core" />
    <many-to-one name="ContentItem" column="content_item_id" class="EnetaMvc.Core.Domain.Content.ContentItem,EnetaMvc.Core" />
  </class>
</hibernate-mapping>